import directiveInit from './directive';
import mixinInit from "./mixin";

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import locale from 'element-plus/lib/locale/lang/zh-cn'; // 中文语言
import elementIcons from '@/components/SvgIcon/svgicon';

// svg图标
import 'virtual:svg-icons-register';

import Pagination from '@/components/Pagination';
import SvgIcon from '@/components/SvgIcon';
import tool from '@/tool/index';

/**
 * vue 应用配置
 */
export default function (vue) {
    vue.config.productionTip = false;
    vue.config.appName = '工具应用';
    vue.config.unwrapInjectedRef = true;

    directiveInit(vue);
    mixinInit(vue);
	
	init(vue);

    console.info('当前vue版本 - ' + vue.version);
}

function init(vue) {
	vue.use(ElementPlus, { locale: locale });
	vue.use(elementIcons);
	vue.use(tool);
	vue.component('Pagination', Pagination);
	vue.component('svg-icon', SvgIcon);
}